package com.yuke.cloud.service.cmc.controller.frontend;

import com.yuke.cloud.common.util.wrapper.WrapMapper;
import com.yuke.cloud.common.util.wrapper.Wrapper;
import com.yuke.cloud.service.cmc.entity.CmsNotice;
import com.yuke.cloud.service.cmc.service.CmsNoticeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(value = "WEB -  MallCmsNoticeController", tags = "APP版本相关请求", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RestController
@RequestMapping("/mall/cms/notice")
public class MallCmsNoticeController {

    @Resource
    private CmsNoticeService cmsNoticeService;

    @GetMapping("/new")
    @ApiOperation(httpMethod = "GET", value = "根据ID获取最新具体信息")
    public Wrapper<CmsNotice> newModify() {

        return WrapMapper.ok(cmsNoticeService.getNewNotice());
    }
}
